home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DATATYPE.SWG / 0004_COMPARE.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  382b  |  23 lines

  1. {
  2. SEAN PALMER
  3.  
  4. generic compare Function...
  5. make sure to keep garbage out of Strings (by filling With #0
  6. before storing the Strings) and you can compare ANY data With this.
  7. }
  8.  
  9. Function equal(Var m1, m2; siz : Word) : Boolean; Assembler;
  10. Asm
  11.   push ds
  12.   cld
  13.   les di, m1
  14.   lds si, m2
  15.   mov cx, siz
  16.   xor al, al
  17.   repe cmpsb
  18.   jne @S
  19.   inc al
  20.  @S:
  21.   pop ds
  22. end;
  23.